package com.ymy.thinking.in.spring.dependency.injection.annotation;

import org.springframework.beans.factory.annotation.Autowired;

import java.lang.annotation.*;

/**
 * 元标注：
 * <p>
 * {@link Autowired} 可以用在注解上, 我们自定义的注解就有了 {@link Autowired} 的功能
 *
 * @author Ringo
 * @date 2021/10/18 22:04
 */
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Autowired
public @interface MyAutowired {

    boolean required() default true;

}
